import { App, Directive } from "vue";

export default (app: App) => {
    Object.entries(
        import.meta.glob<Directive>('./modules/*.ts', { eager: true, import: 'default' })
    ).forEach(([file, directive]) => {
        const name = file.substring(file.lastIndexOf('/') + 1, file.lastIndexOf('.ts'));
        app.directive(name, directive)
    })
}